﻿<!DOCTYPE html>
<html>

<head>
    <title>我的任务</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <!--responsive-->
    <link rel="shortcut icon" href="../Content/img/jridge.ico"/>
    <link rel="bookmark" href="../Content/img/jridge.ico"/>
    <script src="../Scripts/jquery-1.10.2.min.js"></script>
    <script src="../Scripts/clipboard-polyfill.js"></script>
    <!--vue-->
    <script src="../Scripts/vue-2.5.9/vue.min.js"></script>
    <!--axios-->
    <script src="../Scripts/vue-2.5.9/axios.min.js"></script>
    <!--elementUI-->
    <script src="../Scripts/elementUI-2.2.2/index.js"></script>
    <link rel="stylesheet" href="../Scripts/elementUI-2.2.2/theme-chalk/index.css">
    <!--custom-->
    <link rel="stylesheet" href="../Content/vue-common.css">
    <script src="../Scripts/service/vue-service.js" ></script>
</head>
<body>
    <div id="app">
        <header-bar :pagename="pagename" :userinfo="userinfo"></header-bar>
        <div id="container">
            <el-row>
                <el-row>
                    <el-button type="primary" @click="getCount()">刷新</el-button>
                    <el-radio-group v-model="filter" @change="getCount()">
                        <el-radio-button label="我的已完工任务"></el-radio-button>
                        <el-radio-button label="班组已完工任务"></el-radio-button>
                    </el-radio-group>
                    <el-button type="primary" @click="worktimeDialog = true">查看工时</el-button>
                    <el-switch v-model="searchType" active-text="查询条件"></el-switch>
                    <div style="float: right">
                        <el-pagination
                        background
                        @current-change="handleCurrentChange"
                        :current-page="currentpage"
                        :page-size="everypagenum"
                        layout="total, prev, pager, next "
                        :total="totalnum">
                        </el-pagination>
                    </div>
                </el-row>
                <el-row :gutter="20" v-show="searchType" style="margin-top: 8px">
                    <el-col :span="24">
                        <el-form label-position="left" label-width="80px">
                            <el-col :sm="12" :lg="6" :xl="6">
                                <el-form-item label="批次号">
                                    <el-input v-model="search.lotno" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :sm="12" :lg="6" :xl="6">
                                <el-form-item label="物料编码">
                                    <el-input v-model="search.materialno" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :sm="12" :lg="6" :xl="6">
                                <el-form-item label="产品名称">
                                    <el-input v-model="search.name" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :sm="12" :lg="6" :xl="6">
                                <el-form-item label="图号">
                                    <el-input v-model="search.identityno" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :sm="12" :lg="6" :xl="6" >
                                <el-form-item>
                                    <el-button type="primary" @click="getCount()">查询</el-button>
                                </el-form-item>
                            </el-col>
                        </el-form>
                    </el-col>
                </el-row>
            </el-row>
            <el-row>
                <el-table
                    :data="data"
                    style="width: 100%"
                    border
                    v-loading="loading"
                    @cell-click="cell_click"
                    :cell-class-name="retColor"
                    :max-height="mainTable_maxHeight"
                    >
                    <el-table-column
                        fixed
                        type="index"
                        label="序号"
                        width="50">
                    </el-table-column>
                    <el-table-column
                    v-for="list in head"
                    :prop="list.property"
                    :label="list.name" 
                    :filters="list.filters"
                    :filter-method="filterHandler"
                    sortable>
                    </el-table-column>
                    <el-table-column
                    fixed="right"
                    label="打印"
                    width="120"
                    class="operate">
                    <template slot-scope="scope">
                        <el-button @click="printtype(scope.row)" type="primary">查看</el-button>
                    </template>
                    </el-table-column>
                </el-table>
            </el-row>
        </div>
        <!--工时统计弹出框-->
        <el-dialog title="个人工时统计查询" :visible.sync="worktimeDialog" class="md_dialog_700">
            <el-form :inline="true" label-width="80px">
                <el-form-item label="">
                    <el-date-picker
                        v-model="calc_time"
                        type="daterange"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="" v-show="isManger">
                    <el-select v-model="calc_people">
                        <el-option v-for="list in teamusers" :label="list.properties.name" :value="list.id"></el-option>
                    </el-select>
                </el-form-item>
                <el-button type="primary" @click="calcWorkTime">查询</el-button>
            </el-form>
            <el-row style="text-align:center;min-height:20px;margin-top:10px">
                <h3>{{workTime_result}}</h3>
            </el-row>
        </el-dialog>
        <!--查看状态弹出框-->
        <el-dialog title="查看状态" :visible.sync="printtypeDialog" class="md_dialog_1000">
            <el-table
            :data="printlist"
            style="width: 100%">
                <el-table-column
                prop="id"
                label="ID">
                </el-table-column>
                <el-table-column
                prop="properties.printordernumber"
                label="编号">
                </el-table-column>
                <el-table-column
                prop="properties.creationdate"
                label="申请打印时间">
                </el-table-column>
                <el-table-column
                prop="properties.creator"
                label="申请人">
                </el-table-column>
                <el-table-column
                prop="properties.description"
                label="备注">
                </el-table-column>
                <el-table-column
                prop="properties.state"
                label="打印状态">
                </el-table-column>
                <el-table-column
                prop="properties.reason"
                label="异常处理方法">
                </el-table-column>
            </el-table>
            <span slot="footer" class="dialog-footer">
                <el-button @click="printtypeDialog = false">取 消</el-button>
                <el-button type="primary" @click="print">打 印</el-button>
            </span>
        </el-dialog>
        <component :is="differentDialog" :differentdialogitem="differentDialogItem" :userinfo="userinfo"></component>
    </div>
    <script src="mywork.js"></script>
    <script src="../Template/vue-components.js" ></script>
</body>
</html>